package hotel.board.circuit.predefined;

import hotel.board.circuit.Case;
import hotel.board.circuit.CaseStates;
import hotel.board.circuit.ICase;
import hotel.hotel.IProperty;
import hotel.hotel.Properties;

public class ClassicHotelCircuit implements IPredefinedCircuit {
	
	// ATTRIBUTS
	
	private final ICase[] cases;
	
	// CONSTRUCTEURS
	
	public ClassicHotelCircuit() {
		cases = new ICase[] {
			new Case(null, null, CaseStates.FREE_BUILDING),
			
			new Case(Properties.FUJIYAMA, null, CaseStates.BUILDING_PERMIT),
			
			new Case(Properties.FUJIYAMA, Properties.BOOMERANG, CaseStates.BUY),
			new Case(Properties.FUJIYAMA, Properties.BOOMERANG, CaseStates.BUILDING_PERMIT),
			new Case(Properties.FUJIYAMA, Properties.BOOMERANG, CaseStates.BUY),
			new Case(Properties.FUJIYAMA, Properties.BOOMERANG, CaseStates.BUILDING_PERMIT),
			
			new Case(Properties.FUJIYAMA, null, CaseStates.FREE_ENTRY),
			
			new Case(null, null, CaseStates.BUILDING_PERMIT),
			
			new Case(Properties.L_ETOILE, null, CaseStates.BUY),
			
			new Case(Properties.L_ETOILE, Properties.PRESIDENT, CaseStates.BUY),
			new Case(Properties.L_ETOILE, Properties.PRESIDENT, CaseStates.FREE_BUILDING),
			
			new Case(Properties.ROYAL, Properties.PRESIDENT, CaseStates.BUY),
			new Case(Properties.ROYAL, Properties.PRESIDENT, CaseStates.BUILDING_PERMIT),
			new Case(Properties.ROYAL, Properties.PRESIDENT, CaseStates.BUY),
			new Case(Properties.ROYAL, Properties.PRESIDENT, CaseStates.BUILDING_PERMIT),
			new Case(Properties.ROYAL, Properties.PRESIDENT, CaseStates.BUY),
			
			new Case(Properties.ROYAL, Properties.WAIKIKI, CaseStates.BUILDING_PERMIT),
			new Case(Properties.ROYAL, Properties.WAIKIKI, CaseStates.BUY),
			new Case(Properties.ROYAL, Properties.WAIKIKI, CaseStates.FREE_ENTRY),
			new Case(Properties.ROYAL, Properties.WAIKIKI, CaseStates.BUILDING_PERMIT),
			new Case(Properties.ROYAL, Properties.WAIKIKI, CaseStates.BUY),
			
			new Case(Properties.L_ETOILE, Properties.TAJ_MAHAL, CaseStates.BUY),
			new Case(Properties.L_ETOILE, Properties.TAJ_MAHAL, CaseStates.BUILDING_PERMIT),
			new Case(Properties.L_ETOILE, Properties.TAJ_MAHAL, CaseStates.BUY),
			new Case(Properties.L_ETOILE, Properties.TAJ_MAHAL, CaseStates.FREE_BUILDING),
			
			new Case(null, Properties.TAJ_MAHAL, CaseStates.BUILDING_PERMIT),
			
			new Case(null, Properties.SAFARI, CaseStates.BUILDING_PERMIT),
			new Case(null, Properties.SAFARI, CaseStates.BUILDING_PERMIT),

			new Case(Properties.L_ETOILE, Properties.SAFARI, CaseStates.BUY),
			new Case(Properties.L_ETOILE, Properties.SAFARI, CaseStates.FREE_ENTRY),

			new Case(null, Properties.SAFARI, CaseStates.BUILDING_PERMIT),
		};
	}
	
	// REQUETES

	@Override
	public ICase[] getCases() {
		return cases;
	}

	@Override
	public int getBankPosition() {
		return 6;
	}

	@Override
	public int getCityHallPosition() {
		return 25;
	}
	
	@Override
	public IProperty[] getProperties() {
		return Properties.values();
	}

}
